import { createReactive } from '../spl/reactive';

const template = `
    <div>
        <h1>学生列表</h1>
        <for data="data" tag="ul" class="list">
            <li>
                <span>名字：{ name }</span>
                <span>年龄：{ age }</span>
            </li>
        </for>
    </div>
`;

function TestA() {
    const state = createReactive({
        data: [
            {
                name: 'spl1',
                age: 28
            }, {
                name: 'spl2',
                age: 29
            }, {
                name: 'spl3',
                age: 30
            }
        ]
    });
    return [template, state];
}

export default TestA;